home *** CD-ROM | disk | FTP | other *** search
- Path: mserv.wizvax.net!news
- From: tonyp@wizvax.wizvax.net (Tony Postmayer)
- Newsgroups: comp.lang.c
- Subject: Re: malloc question
- Date: Sat, 06 Apr 1996 23:51:19 GMT
- Organization: Wizvax Communications, Troy, N.Y. 12180 USA
- Message-ID: <316702e2.5544507@199.181.141.3>
- References: <4k6tgn$13c8@pulp.ucs.ualberta.ca>
- NNTP-Posting-Host: tonyp.wizvax.net
- X-Newsreader: Forte Agent .99d/32.182
-
- On 6 Apr 1996 23:08:07 GMT, hcolquho@gpu3.srv.ualberta.ca (Harry
- Colquhoun) wrote:
-
- >Not quite sure what's happening here, most likely something real stupid I
- >did, I'm sure.
- >
- >compiled using djgpp under MSDOS->works fine
- >compiled using djgpp on SGI->core dump
- >
- >-------------------------
- >global variable 'frames'
- >
- >the problem:
- >
- >unsigned long int *mem;
- >mem = (unsigned long int *) malloc (frames);
- >-------------------------
- >
- >Anyone know why?
- >
- Don't you want to say [frames * sizeof (unsigned long int)] ? IOW,
- you're not mallocing enough memoy.
-
- Tony -
-
-